<!DOCTYPE html>
<html>
<head>
	<!-- Global site tag (gtag.js) - Google Analytics -->
	<script async src="https://www.googletagmanager.com/gtag/js?id='UA-133422980-2"></script>
	<script>
	  window.dataLayer = window.dataLayer || [];
	  function gtag(){dataLayer.push(arguments);}
	  gtag('js', new Date());

	  gtag('config', 'UA-133422980-2');
	</script>

	<meta charset="utf-8">
	<meta http-equiv="x-ua-compatible" content="ie=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">

	<title>
		gem5: Creating a very simple SimObject 
	</title>

	<!-- SITE FAVICON -->
	<link rel="shortcut icon" type="image/gif" href="/assets/img/gem5ColorVert.gif"/>

	<link rel="canonical" href="http://localhost:4000/documentation/learning_gem5/part2/helloobject/">
	<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,700,800,600' rel='stylesheet' type='text/css'>
	<link href='https://fonts.googleapis.com/css?family=Muli:400,300' rel='stylesheet' type='text/css'>

	<!-- FAVICON -->
	<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">

	<!-- BOOTSTRAP -->
	<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">

	<!-- CUSTOM CSS -->
	<link rel="stylesheet" href="/css/main.css">
</head>


<body>
	<nav class="navbar navbar-expand-md navbar-light bg-light">
  <a class="navbar-brand" href="/">
		<img src="/assets/img/gem5ColorLong.gif" alt="gem5" height=55px>
	</a>
  <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
    <span class="navbar-toggler-icon"></span>
  </button>
  <div class="collapse navbar-collapse" id="navbarNavDropdown">
    <!-- LIST FOR NAVBAR -->
    <ul class="navbar-nav ml-auto">
      <!-- HOME -->
      <li class="nav-item ">
        <a class="nav-link" href="/">Home</a>
      </li>

      <!-- ABOUT -->
			<li class="nav-item dropdown ">
				<a class="nav-link dropdown-toggle" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
					About
				</a>
				<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
          <a class="dropdown-item" href="/about">About gem5</a>
          <a class="dropdown-item" href="/publications">Publications</a>
          <a class="dropdown-item" href="/governance">Governance</a>
				</div>
			</li>

      <!-- DOCUMENTATION -->
			<li class="nav-item dropdown active">
				<a class="nav-link dropdown-toggle" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
					Documentation
				</a>
				<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
					<!-- Pull navigation from _data/documentation.yml -->
					
            <a class="dropdown-item" href="/documentation">gem5 documentation</a>
					
            <a class="dropdown-item" href="/documentation/learning_gem5/introduction">Learning gem5</a>
					
            <a class="dropdown-item" href="http://doxygen.gem5.org/release/current/index.html">gem5 Doxygen</a>
					
            <a class="dropdown-item" href="/documentation/reporting_problems">Reporting Problems</a>
					
				</div>
			</li>

      <!-- EVENTS -->
			<li class="nav-item dropdown ">
        <a class="nav-link" href="/events/">Events</a>
			</li>

      <!-- CONTRIBUTING -->
      <li class="nav-item ">
        <a class="nav-link" href="/contributing">Contributing</a>
      </li>

      <!-- BLOG -->
      <li class="nav-item ">
        <a class="nav-link" href="/blog">Blog</a>
      </li>

      <!-- SEARCH -->
			<li class="nav-item ">
        <a class="nav-link" href="/search">Search</a>
      </li>
    </ul>
  </div>
</nav>

	<main>
		<div class="sidenav-top">
  <div class="sidenav-brand bg-light">
    <a href="/"><img src="/assets/img/gem5ColorLong.gif" height="55px"></a>
  </div>
  <div class="search">
    <form action="/search" method="get">
      <!-- <label for="search-box"><i class="fa fa-search"></i></label> -->
      <input type="text" name="query">
      <button type="submit" name="submit"><i class="fa fa-search"></i></button>
    </form>
  </div>
</div>
<div class="sidenav">
  <!-- Pull navigation from _data/documentation.yml -->
  
    
  
    
    
      <a class="item" href="/documentation/learning_gem5/introduction" role="button" aria-expanded="false" aria-controls="collapseExample">
        Introduction
      </a>
      <div class="collapse " id="introduction">
        
      </div>
    
      <a class="item" data-toggle="collapse" href="#part1" role="button" aria-expanded="false" aria-controls="collapseExample">
        Getting Started
      </a>
      <div class="collapse " id="part1">
        
          <a class="subitem " href="/documentation/learning_gem5/part1/building">Building gem5</a>
        
          <a class="subitem " href="/documentation/learning_gem5/part1/simple_config">Creating a simple configuration script</a>
        
          <a class="subitem " href="/documentation/learning_gem5/part1/cache_config">Adding cache to configuration script</a>
        
          <a class="subitem " href="/documentation/learning_gem5/part1/gem5_stats">Understanding gem5 statistics and output</a>
        
          <a class="subitem " href="/documentation/learning_gem5/part1/example_configs">Using the default configuration scripts</a>
        
      </div>
    
      <a class="item" data-toggle="collapse" href="#part2" role="button" aria-expanded="false" aria-controls="collapseExample">
        Modifying/Extending
      </a>
      <div class="collapse show" id="part2">
        
          <a class="subitem " href="/documentation/learning_gem5/part2/environment">Setting up your development environment</a>
        
          <a class="subitem active" href="/documentation/learning_gem5/part2/helloobject">Creating a very simple SimObject</a>
        
          <a class="subitem " href="/documentation/learning_gem5/part2/debugging">Debugging gem5</a>
        
          <a class="subitem " href="/documentation/learning_gem5/part2/events">Event-driven programming</a>
        
          <a class="subitem " href="/documentation/learning_gem5/part2/parameters">Adding parameters to SimObjects and more events</a>
        
          <a class="subitem " href="/documentation/learning_gem5/part2/memoryobject">Creating SimObjects in the memory system</a>
        
          <a class="subitem " href="/documentation/learning_gem5/part2/simplecache">Creating a simple cache object</a>
        
      </div>
    
      <a class="item" data-toggle="collapse" href="#part3" role="button" aria-expanded="false" aria-controls="collapseExample">
        Modeling Cache Coherence with Ruby
      </a>
      <div class="collapse " id="part3">
        
          <a class="subitem " href="/documentation/learning_gem5/part3/MSIintro">Introduction to Ruby</a>
        
          <a class="subitem " href="/documentation/learning_gem5/part3/cache-intro">MSI example cache protocol</a>
        
          <a class="subitem " href="/documentation/learning_gem5/part3/cache-declarations">Declaring a state machine</a>
        
          <a class="subitem " href="/documentation/learning_gem5/part3/cache-in-ports">In port code blocks</a>
        
          <a class="subitem " href="/documentation/learning_gem5/part3/cache-actions">Action code blocks</a>
        
          <a class="subitem " href="/documentation/learning_gem5/part3/cache-transitions">Transition code blocks</a>
        
          <a class="subitem " href="/documentation/learning_gem5/part3/directory">MSI Directory implementation</a>
        
          <a class="subitem " href="/documentation/learning_gem5/part3/MSIbuilding">Compiling a SLICC protocol</a>
        
          <a class="subitem " href="/documentation/learning_gem5/part3/configuration">Configuring a simple Ruby system</a>
        
          <a class="subitem " href="/documentation/learning_gem5/part3/running">Running the simple Ruby system</a>
        
          <a class="subitem " href="/documentation/learning_gem5/part3/MSIdebugging">Debugging SLICC Protocols</a>
        
          <a class="subitem " href="/documentation/learning_gem5/part3/simple-MI_example">Configuring for a standard protocol</a>
        
      </div>
    
      <a class="item" href="/documentation/learning_gem5/gem5_101/" role="button" aria-expanded="false" aria-controls="collapseExample">
        gem5 101
      </a>
      <div class="collapse " id="gem5_101">
        
      </div>
    
    
  
    
  
    
  
</div>


<div class="container" id="doc-container">
  <div class="edit"><a href="https://gem5.googlesource.com/public/gem5-website/+/refs/heads/master/README.md">Edit this page</a></div>
  <b>authors:</b> Jason Lowe-Power<br>
  

  <br>
  <h1 id="creating-a-very-simple-simobject">Creating a <em>very</em> simple SimObject</h1>

<p>Almost all objects in gem5 inherit from the base SimObject type.
SimObjects export the main interfaces to all objects in gem5. SimObjects
are wrapped <code class="highlighter-rouge">C++</code> objects that are accessible from the <code class="highlighter-rouge">Python</code>
configuration scripts.</p>

<p>SimObjects can have many parameters, which are set via the <code class="highlighter-rouge">Python</code>
configuration files. In addition to simple parameters like integers and
floating point numbers, they can also have other SimObjects as
parameters. This allows you to create complex system hierarchies, like
real machines.</p>

<p>In this chapter, we will walk through creating a simple “HelloWorld”
SimObject. The goal is to introduce you to how SimObjects are created
and the required boilerplate code for all SimObjects. We will also
create a simple <code class="highlighter-rouge">Python</code> configuration script which instantiates our
SimObject.</p>

<p>In the next few chapters, we will take this simple SimObject and expand
on it to include <a href="../debugging">debugging support</a>, <a href="../events">dynamic
events</a>, and <a href="../parameters">parameters</a>.</p>

<blockquote>
  <p><strong>Using git branches</strong></p>

  <p>It is common to use a new git branch for each new feature you add to
gem5.</p>

  <p>The first step when adding a new feature or modifying something in
gem5, is to create a new branch to store your changes. Details on git
branches can be found in the Git book_.</p>

  <div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>git checkout -b hello-simobject
</code></pre></div>  </div>
</blockquote>

<h2 id="step-1-create-a-python-class-for-your-new-simobject">Step 1: Create a Python class for your new SimObject</h2>

<p>Each SimObject has a Python class which is associated with it. This
Python class describes the parameters of your SimObject that can be
controlled from the Python configuration files. For our simple
SimObject, we are just going to start out with no parameters. Thus, we
simply need to declare a new class for our SimObject and set it’s name
and the C++ header that will define the C++ class for the SimObject.</p>

<p>We can create a file, HelloObject.py, in <code class="highlighter-rouge">src/learning_gem5</code>.</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kn">from</span> <span class="nn">m5.params</span> <span class="kn">import</span> <span class="o">*</span>
<span class="kn">from</span> <span class="nn">m5.SimObject</span> <span class="kn">import</span> <span class="n">SimObject</span>

<span class="k">class</span> <span class="nc">HelloObject</span><span class="p">(</span><span class="n">SimObject</span><span class="p">):</span>
    <span class="nb">type</span> <span class="o">=</span> <span class="s">'HelloObject'</span>
    <span class="n">cxx_header</span> <span class="o">=</span> <span class="s">"learning_gem5/hello_object.hh"</span>
</code></pre></div></div>

<p>It is not required that the <code class="highlighter-rouge">type</code> be the same as the name of the class,
but it is convention. The <code class="highlighter-rouge">type</code> is the C++ class that you are wrapping
with this Python SimObject. Only in special circumstances should the
<code class="highlighter-rouge">type</code> and the class name be different.</p>

<p>The <code class="highlighter-rouge">cxx_header</code> is the file that contains the declaration of the class
used as the <code class="highlighter-rouge">type</code> parameter. Again, the convention is to use the name
of the SimObject with all lowercase and underscores, but this is only
convention. You can specify any header file here.</p>

<h2 id="step-2-implement-your-simobject-in-c">Step 2: Implement your SimObject in C++</h2>

<p>Next, we need to create <code class="highlighter-rouge">hello_object.hh</code> and <code class="highlighter-rouge">hello_object.cc</code> which
will implement the hello object.</p>

<p>We’ll start with the header file for our <code class="highlighter-rouge">C++</code> object. By convention,
gem5 wraps all header files in <code class="highlighter-rouge">#ifndef/#endif</code> with the name of the
file and the directory its in so there are no circular includes.</p>

<p>The only thing we need to do in the file is to declare our class. Since
<code class="highlighter-rouge">HelloObject</code> is a SimObject, it must inherit from the C++ SimObject
class. Most of the time, your SimObject’s parent will be a subclass of
SimObject, not SimObject itself.</p>

<p>The SimObject class specifies many virtual functions. However, none of
these functions are pure virtual, so in the simplest case, there is no
need to implement any functions except for the constructor.</p>

<p>The constructor for all SimObjects assumes it will take a parameter
object. This parameter object is automatically created by the build
system and is based on the <code class="highlighter-rouge">Python</code> class for the SimObject, like the
one we created above. The name for this parameter type is generated
automatically from the name of your object. For our “HelloObject” the
parameter type’s name is “HelloObject*<em>Params</em>*”.</p>

<p>The code required for our simple header file is listed below.</p>

<div class="language-cpp highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cp">#ifndef __LEARNING_GEM5_HELLO_OBJECT_HH__
#define __LEARNING_GEM5_HELLO_OBJECT_HH__
</span>
<span class="cp">#include "params/HelloObject.hh"
#include "sim/sim_object.hh"
</span>
<span class="k">class</span> <span class="nc">HelloObject</span> <span class="o">:</span> <span class="k">public</span> <span class="n">SimObject</span>
<span class="p">{</span>
  <span class="nl">public:</span>
    <span class="n">HelloObject</span><span class="p">(</span><span class="n">HelloObjectParams</span> <span class="o">*</span><span class="n">p</span><span class="p">);</span>
<span class="p">};</span>

<span class="cp">#endif // __LEARNING_GEM5_HELLO_OBJECT_HH__
</span></code></pre></div></div>

<p>Next, we need to implement <em>two</em> functions in the <code class="highlighter-rouge">.cc</code> file, not just
one. The first function, is the constructor for the <code class="highlighter-rouge">HelloObject</code>. Here
we simply pass the parameter object to the SimObject parent and print
“Hello world!”</p>

<p>Normally, you would <strong>never</strong> use <code class="highlighter-rouge">std::cout</code> in gem5. Instead, you
should use debug flags. In the <a href="../debugging">next chapter</a>, we
will modify this to use debug flags instead. However, for now, we’ll
simply use <code class="highlighter-rouge">std::cout</code> because it is simple.</p>

<div class="language-cpp highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="cp">#include "learning_gem5/hello_object.hh"
</span>
<span class="cp">#include &lt;iostream&gt;
</span>
<span class="n">HelloObject</span><span class="o">::</span><span class="n">HelloObject</span><span class="p">(</span><span class="n">HelloObjectParams</span> <span class="o">*</span><span class="n">params</span><span class="p">)</span> <span class="o">:</span>
    <span class="n">SimObject</span><span class="p">(</span><span class="n">params</span><span class="p">)</span>
<span class="p">{</span>
    <span class="n">std</span><span class="o">::</span><span class="n">cout</span> <span class="o">&lt;&lt;</span> <span class="s">"Hello World! From a SimObject!"</span> <span class="o">&lt;&lt;</span> <span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div></div>

<p>There is another function that we have to implement as well for the
SimObject to be complete. We must implement one function for the
parameter type that is implicitly created from the SimObject <code class="highlighter-rouge">Python</code>
declaration, namely, the <code class="highlighter-rouge">create</code> function. This function simply returns
a new instantiation of the SimObject. Usually this function is very
simple (as below).</p>

<div class="language-cpp highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">HelloObject</span><span class="o">*</span>
<span class="n">HelloObjectParams</span><span class="o">::</span><span class="n">create</span><span class="p">()</span>
<span class="p">{</span>
    <span class="k">return</span> <span class="k">new</span> <span class="n">HelloObject</span><span class="p">(</span><span class="k">this</span><span class="p">);</span>
<span class="p">}</span>
</code></pre></div></div>

<p>If you forget to add the create function for your SimObject, you will
get a linker error when you compile. It will look something like the
following.</p>

<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>build/X86/python/m5/internal/param_HelloObject_wrap.o: In function `_wrap_HelloObjectParams_create':
/local.chinook/gem5/gem5-tutorial/gem5/build/X86/python/m5/internal/param_HelloObject_wrap.cc:3096: undefined reference to `HelloObjectParams::create()'
collect2: error: ld returned 1 exit status
scons: *** [build/X86/gem5.opt] Error 1
scons: building terminated because of errors.
</code></pre></div></div>

<p>This <code class="highlighter-rouge">undefined reference to `HelloObjectParams::create()'</code> means
you need to implement the create function for your SimObject.</p>

<h2 id="step-3-register-the-simobject-and-c-file">Step 3: Register the SimObject and C++ file</h2>

<p>In order for the <code class="highlighter-rouge">C++</code> file to be compiled and the <code class="highlighter-rouge">Python</code> file to be
parsed we need to tell the build system about these files. gem5 uses
SCons as the build system, so you simply have to create a SConscript
file in the directory with the code for the SimObject. If there is
already a SConscript file for that directory, simply add the following
declarations to that file.</p>

<p>This file is simply a normal <code class="highlighter-rouge">Python</code> file, so you can write any
<code class="highlighter-rouge">Python</code> code you want in this file. Some of the scripting can become
quite complicated. gem5 leverages this to automatically create code for
SimObjects and to compile the domain-specific languages like SLICC and
the ISA language.</p>

<p>In the SConscript file, there are a number of functions automatically
defined after you import them. See the section on that…</p>

<p>To get your new SimObject to compile, you simply need to create a new
file with the name “SConscript” in the <code class="highlighter-rouge">src/learning_gem5</code> directory. In
this file, you have to declare the SimObject and the <code class="highlighter-rouge">.cc</code> file. Below
is the required code.</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">Import</span><span class="p">(</span><span class="s">'*'</span><span class="p">)</span>

<span class="n">SimObject</span><span class="p">(</span><span class="s">'HelloObject.py'</span><span class="p">)</span>
<span class="n">Source</span><span class="p">(</span><span class="s">'hello_object.cc'</span><span class="p">)</span>
</code></pre></div></div>

<h2 id="step-4-re-build-gem5">Step 4: (Re)-build gem5</h2>

<p>To compile and link your new files you simply need to recompile gem5.
The below example assumes you are using the x86 ISA, but nothing in our
object requires an ISA so, this will work with any of gem5’s ISAs.</p>

<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>scons build/X86/gem5.opt
</code></pre></div></div>

<h2 id="step-5-create-the-config-scripts-to-use-your-new-simobject">Step 5: Create the config scripts to use your new SimObject</h2>

<p>Now that you have implemented a SimObject, and it has been compiled into
gem5, you need to create or modify a <code class="highlighter-rouge">Python</code> config file to instantiate
your object. Since your object is very simple a system object is not
required! CPUs are not needed, or caches, or anything, except a <code class="highlighter-rouge">Root</code>
object. All gem5 instances require a <code class="highlighter-rouge">Root</code> object.</p>

<p>Walking through creating a <em>very</em> simple configuration script, first,
import m5 and all of the objects you have compiled.</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kn">import</span> <span class="nn">m5</span>
<span class="kn">from</span> <span class="nn">m5.objects</span> <span class="kn">import</span> <span class="o">*</span>
</code></pre></div></div>

<p>Next, you have to instantiate the <code class="highlighter-rouge">Root</code> object, as required by all gem5
instances.</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">root</span> <span class="o">=</span> <span class="n">Root</span><span class="p">(</span><span class="n">full_system</span> <span class="o">=</span> <span class="bp">False</span><span class="p">)</span>
</code></pre></div></div>

<p>Now, you can instantiate the <code class="highlighter-rouge">HelloObject</code> you created. All you need to
do is call the <code class="highlighter-rouge">Python</code> “constructor”. Later, we will look at how to
specify parameters via the <code class="highlighter-rouge">Python</code> constructor. In addition to creating
an instantiation of your object, you need to make sure that it is a
child of the root object. Only SimObjects that are children of the
<code class="highlighter-rouge">Root</code> object are instantiated in <code class="highlighter-rouge">C++</code>.</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">root</span><span class="o">.</span><span class="n">hello</span> <span class="o">=</span> <span class="n">HelloObject</span><span class="p">()</span>
</code></pre></div></div>

<p>Finally, you need to call <code class="highlighter-rouge">instantiate</code> on the <code class="highlighter-rouge">m5</code> module and actually
run the simulation!</p>

<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">m5</span><span class="o">.</span><span class="n">instantiate</span><span class="p">()</span>

<span class="k">print</span><span class="p">(</span><span class="s">"Beginning simulation!"</span><span class="p">)</span>
<span class="n">exit_event</span> <span class="o">=</span> <span class="n">m5</span><span class="o">.</span><span class="n">simulate</span><span class="p">()</span>
<span class="k">print</span><span class="p">(</span><span class="s">'Exiting @ tick {} because {}'</span>
      <span class="o">.</span><span class="nb">format</span><span class="p">(</span><span class="n">m5</span><span class="o">.</span><span class="n">curTick</span><span class="p">(),</span> <span class="n">exit_event</span><span class="o">.</span><span class="n">getCause</span><span class="p">()))</span>
</code></pre></div></div>

<p>The output should look something like the following</p>

<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>gem5 Simulator System.  http://gem5.org
gem5 is copyrighted software; use the --copyright option for details.

gem5 compiled May  4 2016 11:37:41
gem5 started May  4 2016 11:44:28
gem5 executing on mustardseed.cs.wisc.edu, pid 22480
command line: build/X86/gem5.opt configs/learning_gem5/run_hello.py

Global frequency set at 1000000000000 ticks per second
Hello World! From a SimObject!
Beginning simulation!
info: Entering event queue @ 0.  Starting simulation...
Exiting @ tick 18446744073709551615 because simulate() limit reached
</code></pre></div></div>

<p>Congrats! You have written your first SimObject. In the next chapters,
we will extend this SimObject and explore what you can do with
SimObjects.</p>

  <br>

  <!-- RETRIVE PREVIOUS PAGE LINK -->
  
    
  
    
  
    
  
    
  

  <!-- RETRIEVE NEXT PAGE LINK -->
  
    
  
    
  
    
  
    
  


  <div class="navbuttons">
    
      <a href=""><button type="button" class="btn btn-outline-primary">PREVIOUS</button></a>
    

    
      <a href=""><button type="button" class="btn btn-outline-primary">NEXT</button></a>
    
  </div>
</div>

	</main>
	<footer class="page-footer">
	<div class="container">
		<div class="row">

			<div class="col-12 col-sm-4">
				<p>gem5</p>
				<p><a href="/about">About</a></p>
				<p><a href="/publications">Publications</a></p>
				<p><a href="/contributing">Contributing</a></p>
				<p><a href="/governance">Governance</a></p>
			<br></div>

			<div class="col-12 col-sm-4">
				<p>Docs</p>
				<p><a href="/documentation">Documentation</a></p>
				<p><a href="http://gem5.org/Documentation">Old Documentation</a></p>
				<p><a href="https://gem5.googlesource.com/public/gem5">Source</a></p>
			<br></div>

			<div class="col-12 col-sm-4">
				<p>Help</p>
				<p><a href="/search">Search</a></p>
				<p><a href="/mailing_lists">Mailing Lists</a></p>
				<p><a href="https://gem5.googlesource.com/public/gem5-website/+/refs/heads/master/README.md">Website Source</a></p>
			<br></div>

		</div>
	</div>
</footer>


	<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
	<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
	<script src="https://unpkg.com/commentbox.io/dist/commentBox.min.js"></script>

	<script>
	  // When the user scrolls down 20px from the top of the document, show the button
	  window.onscroll = function() {scrollFunction()};

	  function scrollFunction() {
	      if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 20) {
	          document.getElementById("myBtn").style.display = "block";
	      } else {
	          document.getElementById("myBtn").style.display = "none";
	      }
	  }

	  // When the user clicks on the button, scroll to the top of the document
	  function topFunction() {
	      document.body.scrollTop = 0;
	      document.documentElement.scrollTop = 0;
	  }

		import commentBox from 'commentbox.io';
		// or
		const commentBox = require('commentbox.io');
		// or if using the CDN, it will be available as a global "commentBox" variable.

		commentBox('my-project-id');

	</script>

</body>


</html>
